@use '@scss/common' as *;

$curve: cubic-bezier(0.165, 0.84, 0.44, 1);

.footer {
  position: relative;
  background: var(--color-base-1000);
  padding-top: 8rem;
  padding-bottom: 7.5rem;
  overflow: hidden;

  @include mid-break {
    padding-top: 4rem;
    padding-bottom: 7.5rem;
  }

  .grid {
    grid-row-gap: 3rem;
  }
}

.topBorder {
  border-top: 1px solid var(--grid-line-dark);
}

.container {
  position: relative;
  z-index: 3;
}

.colHeader {
  @include h6;
  & {
    margin-bottom: 4.5rem;
    display: inline-flex;
    align-items: flex-end;
    text-transform: uppercase;
  }

  @include mid-break {
    margin-bottom: 2rem;
  }
}

.footer .link {
  @include body;
  & {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--color-base-0);
    @include underline-on-focus;
  }

  &:hover {
    color: var(--theme-elevation-800);
  }

  @include mid-break {
    width: 100%;
  }
}

.colItems {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 1rem;
}

.subscribeAction {
  display: flex;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.subscribeDesc {
  color: var(--color-base-0);
  margin: 0;
  @include small;
}

.inputWrap {
  position: relative;

  &:hover {
    .inputArrow {
      transform: translateX(6px) rotate(45deg);
      transition: transform 350ms $curve;
    }
  }
}

.emailInput input {
  @include body;
  & {
    padding: 1rem 1.5rem;
    background: var(--color-base-1000);
    border-color: var(--grid-line-dark);
    border-left: none;
    border-right: none;
    margin-left: 1px;
    width: calc(100% - 2px);
    height: auto;
  }

  @include data-theme-selector('light') {
    background: var(--color-base-1000);
  }

  &::placeholder {
    color: var(--color-base-300);
  }
}

.inputArrow {
  z-index: 1;
  color: var(--color-base-300);
  transform: rotate(45deg);
  transition: transform 350ms $curve;
  height: 0.6rem;
  width: auto;
}

.submitButton {
  @include btnReset;
  & {
    cursor: pointer;
    display: block;
    position: absolute;
    right: 1.5rem;
    top: calc(50% - 0.6rem);
  }
}

.socialLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 100%;
  align-items: center;
  margin-bottom: 3rem;
}

.socialIconLink {
  display: inline-flex;
  transition: opacity 350ms $curve;

  &:hover {
    opacity: 0.75;
  }

  & svg {
    height: auto;
    width: 1.6rem;
  }
}

.selectContainer {
  --theme-icon-width: 2rem;
  --theme-switcher-icon-width: 2rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--theme-elevation-500);
  cursor: pointer;
  width: 100%;

  select {
    @include body;
    & {
      all: unset;
      position: relative;
      border-top: 1px solid var(--grid-line-dark);
      border-bottom: 1px solid var(--grid-line-dark);
      width: 100%;
      padding: 1rem 1.5rem;
      padding-left: calc(1.5rem + var(--theme-switcher-icon-width));
    }
  }
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1px;
    z-index: 0;
    height: 100%;
    width: calc(100% - 2px);
    background: var(--color-base-1000);
  }
}

.switcherIcon {
  display: inline-flex;
  height: 1rem;
  justify-content: center;
  position: absolute;
  margin-left: 1.25rem;
}

.themeIcon {
  width: var(--theme-icon-width);
}

.upDownChevronIcon {
  width: var(--theme-switcher-icon-width);
  right: 0.75rem;
  pointer-events: none;
}
